<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!--String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";-->


<!DOCTYPE html>
<html lang="zh-cn">
  <head>
	  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	  <meta charset="utf-8">
	  <!-- Title and other stuffs -->
	  <title>Bootstrap响应式后台管理系统</title> 
	  <meta name="keywords" content="Bootstrap后台管理系统" />
	  <meta name="description" content="Bootstrap后台管理系统" />
	  <meta name="viewport" content="width=device-width, initial-scale=1.0">
	  <meta name="author" content="">
	 <jsp:include page="../bootstrap/top_css.jsp"></jsp:include>
	  
	  <link rel="shortcut icon" href="img/favicon/favicon.png">
	  <script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.js"></script>
	  <script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.form.js"></script>
  	  <script type="text/javascript">
			function newSupplier(){
				location.href="${pageContext.request.contextPath }/jsp/supplier/add_goodsType.jsp";
			}
	  </script>
  </head>
  
  <body>
<!-- top -->
	<jsp:include page="../bootstrap/top.jsp"></jsp:include>

<!-- Header starts -->
  <header>
	<jsp:include page="../bootstrap/top_header.jsp"></jsp:include>
  </header>
<!-- Header ends -->

<!-- Main content starts -->

<div class="content">

  	<!-- 左首页列表 -->
   <jsp:include page="../bootstrap/left.jsp"></jsp:include>

  	<!-- 大容器 -->
  	<div class="mainbar">
      
	    <!-- 首页标题 -->
	    <div class="page-head">
	      <h2 class="pull-left"><i class="icon-home"></i>商品管理</h2>

        <!-- Breadcrumb -->
        <div class="bread-crumb pull-right">
          <a href="index.html"><i class="icon-home"></i> 首页</a> 
          <!-- Divider -->
          <span class="divider">/</span> 
          <a href="#" class="bread-current">商品类别</a>
        </div>
        
        <div class="clearfix"></div>

	    </div>

	    <!-- 正文 -->
	    <form  action="${pageContext.request.contextPath }/supplier/goodsType_list.action" method="post">
	     <table class="table table-striped">
	     <tr>
	     	<td colspan="4" align="center">
		     	  供应商：
		     	  <select name="supplierUuid">
		     	  		<c:forEach items="${supp }" var="s">
		     	  			<option value="${s.uuid }">${s.name }</option>
		     	  		</c:forEach>
		     	  </select>
		     	  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		     	 类别名称：<input type="text" name="name" lang="13px" >&nbsp; 
		     	 <input type="submit" value="搜索">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		     	 <input type="button" onclick="newSupplier()" value="新建">
	     	</td>
	     </tr>
	    
		</table>
	     </form>
	     <table class="table table-striped">
			<thead>
				<tr>
					<th >编号</th>
					<th >供应商</th>
					<th >类别名称</th>
					<th >操作</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${goodsType }" var="goods">
					<tr>
						<td >${goods.uuid }</td>
						<td >${goods.supplier.name }</td>
						<td >${goods.name }</td>
						<td>
							<img src="${pageContext.request.contextPath }/img/icon_3.gif"> 
							<span style="line-height:12px; text-align:center;"> 
								<a href="${pageContext.request.contextPath }/supplier/updateGoodsTypeBefore.action?uuid=${goods.uuid }" class="xiu">修改</a>
							</span> 
							<img src="${pageContext.request.contextPath }/img/icon_04.gif"> 
							<span style="line-height:12px; text-align:center;"> 
								<a href="${pageContext.request.contextPath }/supplier/deleteGoodsTypeById.action?uuid=${goods.uuid }" class="xiu" >删除</a>
							</span>
						</td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
    </div>
    
</div>
   <!-- Mainbar ends -->
   <div class="clearfix"></div>


<!-- 脚部 -->
	<jsp:include page="../bootstrap/bottom.jsp"></jsp:include>

<!-- Scroll to top -->
<span class="totop"><a href="#"><i class="icon-chevron-up"></i></a></span> 

<!-- JS -->
	<jsp:include page="../bootstrap/bottom_JS.jsp"></jsp:include>
  </body>
</html>
